package org.example.Server.mapper.paper;


import org.apache.ibatis.annotations.Mapper;
import org.example.Server.model.paper.*;
import org.example.Server.model.question.QSelect;
import org.example.Server.model.question.QandA;
import org.example.Server.model.question.Question;


import java.util.List;

@Mapper
public interface PaperPersonalMapper {
    void addPaperHeader(PaperHeader pH, Integer isStore);

    void addPaperQsType(Integer paperId);

    void addPaperQs(PaperQsDTO questionPaper);

    List<PaperHeader> getPaperHeaderLsit(Integer techId, Integer directionId, Integer difficulty);

    PaperHeader getPaperHeaderById(Integer paperId);

    List<PaperFormat> getPaperFormatById(Integer paperId);

    List<QandA> getPaperQandA(Integer paperId);

    List<QSelect> getPaperQSelect(Integer paperId, String qsType);

    void addPaperQses(List<Question> questionList, Integer paperId, Double maxScore);

    void updateQsformat(Integer paperFormatId, String formatContent);

    void updatePaperQsMaxscore(Integer qsId, Integer paperId, Double maxScore);

    PaperSetting getPaperSettingById(Integer paperId);

    void updatePaperSetting(PaperSetting paperSetting);

    void deletePapers(List<Integer> ids);

    void deletePaperQs(List<Integer> ids);

    /**
     * 获取试卷头以及试卷题目的ids
     *
     * @param paperId 试卷id
     * @return
     */
    PaperQsIds getPaperQsIdsById(Integer paperId);

    void CopyPaper(PaperHeader paperHeader);

    List<Integer> getQsIdByPaperQId(List<Integer> paperQsIds);
}
